par(mfrow=c(1,2))

stap=0.01;seq=seq(0.005,.995,0.01)
A=dbinom(10,20,seq);A=A/(sum(A)*stap)
B=dbinom(2,20,seq);B=B/(sum(B)*stap)
C=dbinom(1,20,seq);C=C/(sum(C)*stap)
D=dbinom(0,20,seq);D=D/(sum(D)*stap)
sum(seq*A)*stap;sum(seq*B)*stap;sum(seq*C)*stap;sum(seq*D)*stap
plot(seq,D,type='l',col='red',lwd=2,ylim=c(0,16),
axes=FALSE,main=c(paste('F1. Respondent Profiles That Are Based on'),
paste('the SAME Number of Items'),
paste('and DIFFER in Behaviour Probability')),
xlab='Probability of Behaviour',ylab='Plausibility')
axis(side=1,at=seq(0,1,0.1));axis(side=2,at=seq(0,16,2),las=1)
lines(seq,C,type='l',lwd=2,col='green3')
lines(seq,B,type='l',lwd=2,col='magenta')
lines(seq,A,type='l',lwd=2,col='blue')
legend('topright',bty='n',c('Respondent Profile A','Respondent Profile B',
'Respondent Profile C','Respondent Profile D'),cex=0.9,
col=c('blue','magenta','green3','red'),lty=c(1,1,1,1))

stap=0.01;seq=seq(0.005,.995,0.01)
A=dbinom(1,20,seq);A=A/(sum(A)*stap)
B=dbinom(2,40,seq);B=B/(sum(B)*stap)
C=dbinom(3,60,seq);C=C/(sum(C)*stap)
D=dbinom(4,80,seq);D=D/(sum(D)*stap)
sum(seq*A)*stap;sum(seq*B)*stap;sum(seq*C)*stap;sum(seq*D)*stap
plot(seq,D,type='l',col='red',lwd=2,ylim=c(0,16),
axes=FALSE,main=c(paste('F2. Respondent Profiles That Are Based on'),
paste('a DIFFERENT Number of Items'),
paste('and Have the SAME Behaviour Probability')),
xlab='Probability of Behaviour',ylab='Plausibility')
axis(side=1,at=seq(0,1,0.1));axis(side=2,at=seq(0,16,2),las=1)
lines(seq,C,type='l',lwd=2,col='green3')
lines(seq,B,type='l',lwd=2,col='magenta')
lines(seq,A,type='l',lwd=2,col='blue')
legend('topright',bty='n',c('Respondent Profile A','Respondent Profile B',
'Respondent Profile C','Respondent Profile D'),cex=0.9,
col=c('blue','magenta','green3','red'),lty=c(1,1,1,1))
